import request from '../utils/request'

export function getEmployeeList(params) {
  return request({
    url: '/api/employees/page',
    method: 'get',
    params
  })
}

export function getEmployeeById(id) {
  return request({
    url: `/api/employees/${id}`,
    method: 'get'
  })
}

export function createEmployee(data) {
  return request({
    url: '/api/employees',
    method: 'post',
    data
  })
}

export function updateEmployee(data) {
  return request({
    url: '/api/employees',
    method: 'put',
    data
  })
}

export function deleteEmployee(id) {
  return request({
    url: `/api/employees/${id}`,
    method: 'delete'
  })
}

export function login(data) {
  return request({
    url: '/api/employees/login',
    method: 'post',
    data
  })
} 